Most of the network hardware shown here physically look the same but their functions couldn't be more different.
Hub
Hubs are the most basic piece of hardware to create a network. There are actually repeaters; packets of data are not processed at all. They contain multiple data ports and they operate at the Physical Layer of the OSI Model. Packets are received by the hub and then repeated to all connected computers regardless of the intended receiver. This causes more collisions in your network. This type of equipment is no longer use.
Source: Wikimedia
Switch
Switches are more intelligent than hubs. They divide the network into smaller segments. This devices work at the Data Link Layer of the OSI Model. As soon the packet of data is received, the switch would process the packet and read the MAC Address of the computer that the packet is send to. The packet is then redirected to the port where the computer is connected.
Source: hummingscan.org
Router
Router is a more flexible device. They work at the Network Layer of the OSI Model. They connect dissimilar networks, determine the best route for data between point A and point B, and reroute traffic if a segment of the network fails.
Network Hardware
Most of the network hardware shown here physically look the same but their functions couldn't be more different.
Hub
Hubs are the most basic piece of hardware to create a network. There are actually repeaters; packets of data are not processed at all. They contain multiple data ports and they operate at the Physical Layer of the OSI Model. Packets are received by the hub and then repeated to all connected computers regardless of the intended receiver. This causes more collisions in your network. This type of equipment is no longer use.
Switch
Switches are more intelligent than hubs. They divide the network into smaller segments. This devices work at the Data Link Layer of the OSI Model. As soon the packet of data is received, the switch would process the packet and read the MAC Address of the computer that the packet is send to. The packet is then redirected to the port where the computer is connected.Router
Router is a more flexible device. They work at the Network Layer of the OSI Model. They connect dissimilar networks, determine the best route for data between point A and point B, and reroute traffic if a segment of the network fails.